public class Student {
    private String name;
    private int age;

    public Student(){
        System.out.println("无参数构造方法");
    }
    public Student(int age,String name){
        System.out.println("有参数构造方法");
//        System.out.println("小芳的年龄为"+age+"名字为"+name);
        this.age=age;
        this.name=name;
    }

    public String getName(){
        return name;
    }
    public void setName(String name){
        this.name=name;
    }
    public int getAge(){
        return age;
    }
    public void setAge(int age){
        this.age=age;
    }
}
